1. Field of Invention
The present invention relates to a pulse width modulation (PWM) signal generation circuit and a PWM signal generation method; particularly, it relates to such PWM signal generation circuit and PWM signal generation method capable of determining a duty ratio of the PWM signal by adjusting a slope of a variable ramp signal.
2. Description of Related Art
FIG. 1A shows a schematic diagram of a conventional PWM signal generation circuit 10. As shown in FIG. 1A, the PWM signal generation circuit 10 comprises a reference signal generation circuit 11, a fixed ramp signal generation circuit 13 and a comparator circuit 15. The comparator circuit 15 compares a reference signal Comp with a fixed ramp signal Ramp which has a fixed waveform and a fixed level to generate a PWM signal. The reference signal Comp has a linear relationship with the input voltage Vin, and the ramp signal Ramp is a triangle wave or a sawtooth wave having a fixed slope and a fixed amplitude.
FIG. 1B illustrates the signal waveforms corresponding to the conventional PWM signal generation circuit 10 of FIG. 1A. To adjust the duty ratio of a generated PWM signal, this conventional PWM signal generation circuit 10 linearly adjusts the level of the reference signal Comp. That is, referring to FIG. 1B, by providing a different reference signal Comp (e.g., the reference signal Comp 1 is changed to the reference signal Comp 2, as shown in the figure) in the comparator circuit 15 to be compared with the ramp signal Ramp having a fixed waveform and a fixed level, a different PWM signal having a different duty ratio is generated (e.g., from PWM 1 to PWM 2). In other words, in the conventional PWM signal generation circuit 10, the duty ratio of the generated PWM signal can be adjusted by adjusting the level of the input voltage Vin (because the reference signal Comp has a linear relationship with the input voltage Vin).
The drawback of the above-mentioned prior art is that there is only one controllable parameter for adjusting the duty ratio of the PWM signal, which is to adjust the level of the input voltage Vin, and the adjustment of the input voltage Vin can only adjust the duty ratio of the PWM signal in a linear way. In applications requiring more sophisticated control, such as in controlling the rotation speed of a DC motor, when it is required to control the rotation speed of the DC motor more dynamically and more precisely, the conventional PWM signal generation circuit 10 shown in FIG. 1A fails to fulfill the requirement.
To overcome the above-mentioned drawback, U.S. Pat. No. 7,772,903 has proposed a circuit. FIG. 2 illustrates the signal waveforms corresponding to the circuit of U.S. Pat. No. 7,772,903. This prior art adjusts the duty ratio of the PWM signal by adjusting the level of the ramp signal. As shown in FIG. 2, the slope and the amplitude of the ramp signal OSC2 are the same as the slope and the amplitude of the ramp signal OSC1, but the level (as shown by the positions of the peak and the valley) of the ramp signal OSC1 is different from the level of the ramp signal OSC2. Thus, comparing the reference signal Comp with two different ramp signals OSC1 or OSC2 will generate PWM signals of different duty ratios. In other words, in this prior art, if it is desired to adjust the duty ratio of the generated PWM signal, not only the level of the input voltage Vin but also the level of the ramp signal can be used as controllable parameters. As compared with the prior art shown in FIGS. 1A-1B, this prior art has one additional controllable parameter so it can provide more flexible and more precise control.
The drawback of this prior art is that there is an upper limit for the peak and/or a lower limit for the valley of the ramp signal by the nature of the ramp signal generator, so the level of the ramp signal can be adjusted only within a limited range. When the level of the input voltage Vin causes the reference signal Comp to be near the aforementioned upper limit or lower limit, because the ramp signal can not be adjusted to a desired level, the circuit can not generate a PWM signal having a desired duty ratio. In other words, this prior art can not provide rail-to-rail (full range) operation and control.
In view of the above, to overcome the drawbacks in the prior art circuits, the present invention proposes a PWM signal generation circuit and a PWM signal generation method capable of providing flexible and full range operation and control.